在<a></a>中输出查询出来的图片asp的,请指点一下

来源:百度知道 编辑:UC知道 时间:2024/06/21 22:09:02
<a href="display.asp?username=<%=rs("username")%>" target="_blank">
<%response.Write "<img src=photo/"&rs("photo_x")&" width=100 height=75 border=0 hspace=6 vspace=6 alt='查看资料'>"%>
</a>
这里显示不出图片。该怎么改。谢谢。
rs("photo_x")是photo/xxx.jpg 存在的。

<%response.Write "<img src=photo/"&rs("photo_x")&" width=100 height=75 border=0 hspace=6 vspace=6 alt='查看资料'>"%>

修改为下面会好看点。

<%
response.Write "<img src='photo/"&rs("photo_x")&"' width='100' height='75' border='0' hspace='6' vspace='6' alt='查看资料'>"
%>

不是以上错误,就看:rs("photo_x") 的值是什么。
例如:xxx.jpg

那看一下,photo/xxx.jpg 是否存在。

在源代码中查看输出的图片路径,是不是你代码内多了一个路径photo